package cc.siyecao.mapper.enums;

public enum SqlFunction {
    TRIM,
    LOWER,
    UPPER,
    LENGTH,
    AVG,
    SUM,
    MAX,
    MIN,
    REPLACE,
    ROUND;

    public String toFnStr(String columnName) {
        return this + "(" + columnName + ")";
    }

    public String toFnStr(String columnName, Integer value) {
        return this + "(" + columnName + "," + value + ")";
    }

    public String toFnStr(String columnName, String source, String target) {
        return this + "(" + columnName + "," + source + "," + target + ")";
    }

}
